<include file="Public/header"/>
<div class="wrapper m-t">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <a class="h5 font-bold">新增订单商品分类</a>
        </div>
        <div class="ibox-content">
            <form class="form-horizontal" method="post" action="{:U()}">

                <div class="form-group">
                    <label class="col-lg-3 control-label">商品名称：</label>

                    <div class="col-lg-8">
                        <input type="text" name="cate_name" class="form-control"
                               value="<if condition='$edit.cate_name neq null'>{$edit.cate_name}</if>" >
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-lg-3 control-label">上级菜单：</label>

                    <div class="col-lg-8">
                        <select name="pid" class="form-control">
                            <option value="0">顶级分类</option>
                            <volist name="_list" id="vo">
                                <option value="{$vo.id}">{$vo.deli}{$vo.cate_name}</option>
                            </volist>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-3 control-label">状态：</label>

                    <div class="col-lg-8">
                        <if condition="$edit neq null">
                            <input type="hidden" name="id" value="{$edit.id}"/>
                            <div class="col-sm-6">
                                <if condition="$edit.status eq 1">
                                    <input type="radio" value="1" name="status" checked>启用 &nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="radio" value="0" name="status">禁用
                                    <else/>
                                    <input type="radio" value="1" name="status" >启用 &nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="radio" value="0" name="status" checked>禁用
                                </if>
                            </div>
                            <else/>
                            <div class="col-sm-6">
                                <input type="radio" value="1" name="status" checked>启用 &nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="radio" value="0" name="status">禁用
                            </div>
                        </if>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-3 control-label">说明：</label>

                    <div class="col-lg-8">
                        <input type="text" value="<if condition='$edit.remark neq null'>{$edit.remark}</if>"
                               name="remark" class="form-control">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-lg-3 control-label"></label>

                    <div class="col-lg-8">
                        <input type="submit" class="btn btn-primary m-r " target-form="form-horizontal" value="确定"/>
                        <input type="button" onclick="javascript:history.back(-1);return false;" class="btn btn-info" value="返回"/>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<include file="Public/footer"/>
<script>
    var pid='{$edit[pid]}';
    $("[name='pid']").val(pid);
</script>